class CreateContests < ActiveRecord::Migration
  def self.up
    create_table :contests do |t|
      t.datetime :start_time
      t.datetime :end_time
      t.string :name
      t.timestamps
    end
    create_table(:contests_problems, :id => false) do |t|
      t.references :contest
      t.references :problem
    end

  end

  def self.down
    drop_table :contests
    drop_table :contests_problems
  end
end
